import request from '@/utils/request.js'

// 常量
const api_name = '/product/admin/specification'

export default {
    getSpecificationPage(params) {
        return request({
            url: `${api_name}/getSpecificationPage`,
            method: 'get',
            params: params
        })
    },
    getSpecificationDetailsById(id) {
        return request({
            url: `${api_name}/getSpecificationDetailsById/${id}`,
            method: 'get'
        })
    },
    saveSpecification(data) {
        return request({
            url: `${api_name}/saveSpecification`,
            method: 'post',
            data: data
        })
    },
    updateSpecification(data) {
        return request({
            url: `${api_name}/updateSpecification`,
            method: 'post',
            data: data
        })
    },
    batchDeleteByIds(ids) {
        return request({
            url: `${api_name}/batchDeleteByIds`,
            method: 'post',
            data: ids
        })
    }
}
